package com.flyco.modules.sms.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.flyco.common.aspect.annotation.Dict;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Description: 赠品配置表
 * @Author: flyco
 * @Date:   2023-02-03
 * @Version: V1.0
 */
@Data
public class SmsGiftInfoModel {
	/**id*/
	private Long id;
	/**商家id*/
	/**活动名称*/
	private String name;
	/**每满多少件*/
	private Integer minCount;
	/**赠送多少件*/
	private Integer freeCount;
	/**单次最多赠品数量，0表示不限*/
	private Integer limitCount;
	/**startTime*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date startTime;
	/**endTime*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date endTime;

	/**
	 * 0->全场通用；1->指定分类；2->指定商品
	 */
	@Dict(dicCode = "useType")
	private Integer useType;

	private Integer brandCategory;

	private String note;

	/**关联分类*/
	private List<Long> categoryList = new ArrayList<>();

	/**关联商品*/
	private List<Long> productList = new ArrayList<>();

	/**关联经销商分组*/
	private List<Long> storeGroupList = new ArrayList<>();

	/**关联经销商*/
	private List<String> storeList = new ArrayList<>();

	/**
	 * 经销商类型：0->全场通用；1->指定分组；2->指定经销商
	 */
	@Dict(dicCode = "giftStoreType")
	private Integer storeType;
}
